Skip to content

Instantly share code, notes, and snippets.

#include <windows.h>
#include <mmdeviceapi.h>
#include <audioclient.h>
#include <assert.h>
#define _USE_MATH_DEFINES
#include <math.h> // for sin()
#include <stdint.h>
@chrisdigital
chrisdigital / Frontend user profile in WordPress
Created May 6, 2013 13:27
Setting up a editable user profile in WordPress on the frontend.
//How to edit a user profile on the front end?
//http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end
//Forcing nickname as display_name in custom edit profile template
//http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template
///////
<?php
@fabiomontefuscolo
fabiomontefuscolo / models.py
Created January 9, 2012 19:20
Let the Django FileField overwrite files with the same name
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.db import models
class OverwriteStorage(FileSystemStorage):
'''
Muda o comportamento padrão do Django e o faz sobrescrever arquivos de
mesmo nome que foram carregados pelo usuário ao invés de renomeá-los.
'''
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 11, 2024 13:14
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// from https://kelvinzhang.com/playground/scroll-area
import { CSSProperties, useCallback, useEffect, useRef, useState } from "react";
import styled from 'styled-components';
type ScrollAreaProps = {
children: React.ReactNode;
showOverflowIndicator?: boolean;
hideScrollbar?: boolean;
indicatorColor?: CSSProperties["background"];
{
"⤡": "⤡",
"⊞": "⊞",
"×": "×",
"❮": "❮",
"❯": "❯",
"Loading...": "加载中...",
"Waiting...": "等待中...",
"In queue...": "队列中...",
"@@/^Waiting (.*)$/": "等待中 $1",
@magnetikonline
magnetikonline / README.md
Last active May 11, 2024 13:11
Modify DHCP DNS servers for Optus supplied (Vividwireless) Huawei B315 4G modem.

Modify DNS for Optus supplied Huawei B315 4G modem

The Huawei B315 modem supplied by Optus for the (now defunt) Vividwireless service is a workable but sadly rather crippled device, even down to the inability to modify assigned DNS servers from it's DHCP server away from Optus DNS to something sane (Google DNS/Cloudflare/etc.).

This script should allow for the easy update of assigned DNS servers and has been tested with Google Chrome.

Usage

  • Log into router web UI (e.g. http://192.168.0.1).
  • From the same browser session, open the "web developer tools" pane.
@zjhiphop
zjhiphop / 分布式系统学习资料.md
Created July 23, 2015 06:13
分布式系统学习资料

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@tatsuyasusukida
tatsuyasusukida / !README-javascript-audio.md
Last active May 11, 2024 12:59
🎵 How to record audio using the Web Audio API in JavaScript

🎵 How to record audio using the Web Audio API in JavaScript

Demo video: How to record audio using the Web Audio API in JavaScript

About this article

This article describes how to record audio using the Web Audio API in JavaScript. The related resources are shown below.

@Negima1072
Negima1072 / movie-dt-sm9.json
Last active May 11, 2024 12:57
ニコ動 動画情報取得API サンプルレスポンス
{
"meta": {
"status": 200
},
"data": {
"ads": null,
"category": null,
"channel": null,
"client": {
"nicosid": "1655641951.858569142",